#ifndef  __MATERIAL__
#define __MATERIAL__
#pragma once

#include "Hitable.h"
#include "Random.h"

struct HitRecord;
class Hitable;

class Material
{
public:
	virtual bool scatter(const Ray& r_in, const HitRecord& rec, Vector3& attenuation, Ray& scattered) const = 0;
protected:
	Vector3 random_in_unit_sphere() const
	{
		Vector3 p;
		do {
			p = 2.0*Vector3(random_double(), random_double(), random_double()) - Vector3(1, 1, 1);

		} while (p.squared_length() >= 1.0);
		return p;
	}
};



#endif // ! __MATERIAL__

